# inheritance example
class Animal:

    def makeSound(self):
        self.speak()

    def speak(self):
        print "Hi, I am an animal."


class Dog(Animal):

    def speak(self):
        print "Woof woof."


class Car(Animal):

    def speak(self):
        print "Brrrr."


class Primate(Animal):

    def speak(self):
        print "I am a primate. I am smart."


class Carol(Primate):

    def speak(self):
        print "Carol is awesome."

# --------------------------------------

dogObj = Dog()
dogObj.makeSound()

carolObj = Carol()
carolObj.makeSound()

animalObj = Animal()
animalObj.makeSound()

